#!/bin/sh
#|-*- mode:lisp -*-|#
#|
exec lilu-script.ros -- $0 "$@"
|#

(ql:quickload :lilu-debugger)
(ql:quickload :lilu-emacs)
(ql:quickload :bordeaux-threads)

;;(lilu-roswell:init-debugging)
(defun test01 (d1 d2)
  (lilu-debugger:with-debugger (d1)
    (lilu-debugger:with-debugger(d2)
      (format *debug-io* "active debugger: ~A~%" lilu-debugger:*debugger*)
      (setf lilu-debugger:*default-debugger* :emacs)
      (error "myerror2"))
    (sleep 0.5)))

(lilu-debugger::enable-debugger)
(setf lilu-debugger:*default-debugger* :abort)

(test01 :emacs :default)
(test01 :default :emacs)

#|
(let ((lilu-debugger:*default-debugger* :none))
  (test01 :emacs :default))

(let ((lilu-debugger:*default-debugger* :default))
  (test01 :emacs :default))
|#
